package com.bugstack.domain.activity.service.paytake.threadTask;

import com.bugstack.domain.activity.model.entity.ActivityAccountEntity;
import com.bugstack.domain.activity.reopsitory.IActivityRepository;

import java.util.concurrent.Callable;

/**
 * @Author: czb
 * @Description: 查询总账户
 * @DateTime: 2025/6/10 18:10
 **/
public class QueryRaffleActivityAccountTask implements Callable<ActivityAccountEntity> {

    private final Long activityId;
    private final String userId;
    private final IActivityRepository activityRepository;

    public QueryRaffleActivityAccountTask(Long activityId, String userId, IActivityRepository activityRepository) {
        this.activityId = activityId;
        this.userId = userId;
        this.activityRepository = activityRepository;
    }

    @Override
    public ActivityAccountEntity call() throws Exception {
        return activityRepository.queryRaffleActivityAccountByUserId(activityId, userId);
    }
}
